home *** CD-ROM | disk | FTP | other *** search
- // vim: ts=2 sw=2 expandtab ai
- /*
- * BEGIN FLOCK GPL
- *
- * Copyright Flock Inc. 2005-2007
- * http://flock.com
- *
- * This file may be used under the terms of of the
- * GNU General Public License Version 2 or later (the "GPL"),
- * http://www.gnu.org/licenses/gpl.html
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * END FLOCK GPL
- */
-
- const CLASS_ID = Components.ID("{7bd3c99c-d2aa-4cde-9d11-2ebc193def3f}");
- const CLASS_NAME = "Flock Build Properties";
- const CONTRACT_ID = "@flock.com/build-properties;1";
-
-
- function flockBuildProperties () {
- this.revision = "$Revision: 10993 $".match ('[$]Revision: ([0-9]+) [$]$')[1]
- }
- // nsISupports
- flockBuildProperties.prototype.QueryInterface =
- function flockBuildProperties_QueryInterface (aIID) {
- if (!aIID.equals (Components.interfaces.nsISupports) &&
- !aIID.equals(Components.interfaces.flockIBuildProperties)) {
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-
- return this;
- }
- // nsIClassInfo
- flockBuildProperties.prototype.getInterfaces =
- function flockBuildProperties (aCount) {
- var interfaces = [Components.interfaces.nsIClassInfo, Components.interfaces.nsISupports, Components.interfaces.flockIBuildProperties];
- aCount.value = interfaces.length;
- return interfaces;
- }
- flockBuildProperties.prototype.getHelperForLanguage =
- function (aLanguage) { return null; }
- flockBuildProperties.prototype.contractID = CONTRACT_ID;
- flockBuildProperties.prototype.classDescription = CLASS_NAME;
- flockBuildProperties.prototype.classID = CLASS_ID;
- flockBuildProperties.prototype.implementationLanguage =
- Components.interfaces.nsIProgrammingLanguage.JAVASCRIPT;
- flockBuildProperties.prototype.flags =
- Components.interfaces.nsIClassInfo.SINGLETON;
-
-
-
-
- /******************************************************************************
- * XPCOM Functions for construction and registration
- ******************************************************************************/
- var Module = {
- _firstTime: true,
- registerSelf: function(aCompMgr, aFileSpec, aLocation, aType)
- {
- if (this._firstTime) {
- this._firstTime = false;
- throw Components.results.NS_ERROR_FACTORY_REGISTER_AGAIN;
- }
- aCompMgr = aCompMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
- aCompMgr.registerFactoryLocation(CLASS_ID, CLASS_NAME, CONTRACT_ID, aFileSpec, aLocation, aType);
- },
-
- unregisterSelf: function(aCompMgr, aLocation, aType)
- {
- aCompMgr = aCompMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
- aCompMgr.unregisterFactoryLocation(CLASS_ID, aLocation);
- },
-
- getClassObject: function(aCompMgr, aCID, aIID)
- {
- if (!aIID.equals(Components.interfaces.nsIFactory))
- throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
- if (aCID.equals(CLASS_ID))
- return Factory;
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- canUnload: function(aCompMgr) { return true; }
- };
-
- var Factory = {
- createInstance: function(aOuter, aIID)
- {
- if (aOuter != null)
- throw Components.results.NS_ERROR_NO_AGGREGATION;
- return (new flockBuildProperties()).QueryInterface(aIID);
- }
- };
-
- function NSGetModule(aCompMgr, aFileSpec) { return Module; }
-